<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="box" style="border: solid">hello box</div>
    <script>
      const box = document.getElementById("box");
      // box.onmousedown = function () {
      //   console.log("onmousedown");
      // };
      // box.onmouseup = function () {
      //   console.log("onmouseup");
      // };

      // box.onmouseover = function () {
      //   console.log("onmouseover");
      // };
      // box.onmouseout = function () {
      //   console.log("onmouseout");
      // };

      box.onclick = function (e) {
        console.log("onclick", e.button);
      };
      // box.ondblclick = function () {
      //   console.log("ondblclick");
      // };

      // box.onmousemove = function () {
      //   console.log("onmousemove");
      // };

      box.oncontextmenu = function (e) {
        console.log(e.button);
      };
    </script>
  </body>
</html>
